package com.lst.tools.mybatis.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author: Frank
 * @date: 2019/9/26 11:55
 * @version: V1.0
 */
public interface ExpandBaseMapper<T> extends BaseMapper<T> {

    String ENTITY_PARAM_NAME = "entity";

    /**
     * 不存在时保存
     *
     * @param t
     * @param queryWrapper
     * @return
     */
    int insertNotExist(@Param(ENTITY_PARAM_NAME) T t, @Param("ew") Wrapper<T> queryWrapper);
}
